#!/bin/bsah
set -e
set +o noglob
DIR="$(cd "$(dirname "$0")" && pwd)"
source $DIR/common.sh

item=0
h2 "[Step $item]: backup yum.repo.d ..."; let item+=1
sudo cp -r /etc/yum.repos.d /etc/yum.repos.d.backup
h2 "[Step $item]: download aliyun.yum.repo.d ..."; let item+=1
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
h2 "[Step $item]: clean cache ..."; let item+=1
yum clean all 
h2 "[Step $item]: makecache ..."; let item+=1
yum makecache
h2 "[Step $item]: install net-tools ..."; let item+=1
yum install -y net-tools
h2 "[Step $item]: install vim ..."; let item+=1
yum install -y vim
h2 "[Step $item]: install bash-completion ..."; let item+=1
yum install -y  bash-completion
h2 "[Step $item]: install wget ..."; let item+=1
yum install -y wget
success $"----yum update already; net-tools, vim, bash-completion, wget has been installed successfully.----"
#curl -O http://mirrors.aliyun.com/centos/7/updates/x86_64/Packages/unzip-6.0-24.el7_9.x86_64.rpm